package 春游;

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int T = in.nextInt();
        while (T-- > 0) {
            int n = in.nextInt();
            long a = in.nextLong();
            long b = in.nextLong();
            long res = 0;
            if (n <= 2) {
                res = Math.min(a, b);
            } else {
                if (3 * a < 2 * b) {
                    int x = n / 2;
                    int y = n % 2;
                    if (y == 1) {
                        res += Math.min(Math.min(a, b), b - a);
                    }
                    res += a * x;
                } else {
                    int x = n / 3;
                    int y = n % 3;
                    if (y == 1) {
                        res += Math.min(Math.min(a, b), 2 * a - b);
                    } else if (y == 2) {
                        res += Math.min(Math.min(a, b), 3 * a - b);
                    }
                    res += b * x;
                }
            }
            System.out.println(res);
        }
    }
}
